﻿using System;
namespace RealTimeStocks
{
	class StockValuePrc
	{
		public string StockName { get; set; }
		public string StockValue { get; set; }
		public string StockPrc { get; set; }
		public string Volume { get; set; }
		public DateTime DateStamp { get; set; }
		public StockValuePrc(string stockName, string valueAndPrc)
		{
			DateStamp = DateTime.Now;
			StockName = stockName;
			string[] tmp = valueAndPrc.Split('|');
			StockValue = tmp[0];
			if (tmp.Length > 1)
				StockPrc = tmp[1];
			if (tmp.Length > 2)
				Volume = tmp[2];
		}
	}
}
